package com.jinghao.ctws.controller;

import java.util.Map;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.context.annotation.Scope;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.ModelAttribute;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.ResponseBody;

import com.jinghao.core.common.controller.JingHaoBaseController;
import com.jinghao.ctws.entity.CwvCamera;
import com.jinghao.ctws.service.ICwvCameraService;

@Controller
@Scope("prototype")
@RequestMapping(value = "/app/ctws/CwvCamera")
public class CwvCameraController extends JingHaoBaseController<CwvCamera> {
	//==================定制内容开始======================
//在这里修改代码
	/**
	 * 查询所有摄像头信息
	 * @param  
	 */
	@ResponseBody
	@RequestMapping(value = "/listCwvCamera",method = RequestMethod.GET) 
	public Map<String, Object> listCwvCamera(@ModelAttribute("model") CwvCamera model){
		this.getCwvCameraService().listCwvCamera(model);
        return model.getListJson();   
	} 
	//==================定制内容结束======================

	@Autowired
	public void setCwvCameraService(ICwvCameraService cwvCameraService) {
		super.setIJingHaoBaseService(cwvCameraService);
	}

	public ICwvCameraService getCwvCameraService() {
		return (ICwvCameraService) super.getIJingHaoBaseService();
	}
}
